/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
//import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
//import javax.persistence.Temporal;
//import javax.persistence.TemporalType;

/**
 *
 * @author faizal.azlee
 */
@Entity
@Table(name = "kod_kebenaran_transaksi")
@NamedQueries({
    @NamedQuery(name = "KodKebenaranTransaksi.findAll", query = "SELECT k FROM KodKebenaranTransaksi k")})
public class KodKebenaranTransaksi implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "kod_kebenaran_transaksi_id")
    private Integer kodKebenaranTransaksiId;
    @Column(name = "operasi")
    private String operasi;
    @Column(name = "id_sessi")
    private String idSessi;
    @Column(name = "sah")
    private String sah;
    @Column(name = "kod_kebenaran_transaksi")
    private String kodKebenaranTransaksi;
    @Embedded
    private InfoAudit infoAudit;
       
    public KodKebenaranTransaksi() {
    }

    public KodKebenaranTransaksi(Integer KodKebenaranTransaksiId) {
        this.kodKebenaranTransaksiId = KodKebenaranTransaksiId;
    }

    public Integer getKodKebenaranTransaksiId() {
        return kodKebenaranTransaksiId;
    }

    public void setKodKebenaranTransaksiId(Integer KodKebenaranTransaksiId) {
        this.kodKebenaranTransaksiId = KodKebenaranTransaksiId;
    }

    public String getOperasi() {
        return operasi;
    }

    public void setOperasi(String operasi) {
        this.operasi = operasi;
    }

    public String getIdSessi() {
        return idSessi;
    }

    public void setIdSessi(String idSessi) {
        this.idSessi = idSessi;
    }

    public String getSah() {
        return sah;
    }

    public void setSah(String sah) {
        this.sah = sah;
    }   
    

    public String getKodKebenaranTransaksi() {
        return kodKebenaranTransaksi;
    }

    public void setKodKebenaranTransaksi(String kodKebenaranTransaksi) {
        this.kodKebenaranTransaksi = kodKebenaranTransaksi;
    }    

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }
   
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (kodKebenaranTransaksiId != null ? kodKebenaranTransaksiId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof KodKebenaranTransaksi)) {
            return false;
        }
        KodKebenaranTransaksi other = (KodKebenaranTransaksi) object;
        if ((this.kodKebenaranTransaksiId == null && other.kodKebenaranTransaksiId != null) || (this.kodKebenaranTransaksiId != null && !this.kodKebenaranTransaksiId.equals(other.kodKebenaranTransaksiId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {        
        return "th.model.KodKebenaranTransaksi kodKebenaranTransaksiId=" + kodKebenaranTransaksiId + " ]";
    }
    
}
